<template>
    <div class="addOrEdit">
        <!-- 年份 -->
        <div class="select-box" id="select-box">
            <div class="select-label">年份</div>
            <div class="select-value">
                请选择 <img src="@/assets/images/rightArrow.png" alt="">
            </div>
            <!-- <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select> -->
        </div>
        <div class="select-box" id="select-box">
            <div class="select-label">业务类别</div>
            <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </div>
        <div class="select-box" id="select-box">
            <div class="select-label">分管领导</div>
            <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </div>
        <div class="select-box" id="select-box">
            <div class="select-label">任务类别</div>
            <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </div>
        <div class="select-box" id="select-box">
            <div class="select-label">进度状态</div>
            <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </div>
        <div class="select-box" id="select-box">
            <div class="select-label">任务类别</div>
            <el-select popper-class="customClass1" v-model="form.year" placeholder="请选择" class="select1 base-select"
                @change="onYear" clearable>
                <el-option v-for="item in yearColumns" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
        </div>
        <div class="input-box">
            <div class="input-label">具体工作内容</div>
            <div class="input-fill">
                <input type="text" placeholder="请填写">
                <!-- <el-input v-model="input" placeholder="请填写" /> -->
            </div>
        </div>
        <div class="input-box">
            <div class="input-label">年度计划进度</div>
            <div class="input-fill">
                <input type="text" placeholder="请填写">
                <!-- <el-input v-model="input" placeholder="请填写" /> -->
            </div>
        </div>
        <div class="input-box">
            <div class="input-label">推进完成情况</div>
            <div class="input-fill">
                <input type="text" placeholder="请填写">
                <!-- <el-input v-model="input" placeholder="请填写" /> -->
            </div>
        </div>
        <div class="input-box">
            <div class="input-label">需要说明</div>
            <div class="input-fill">
                <input type="text" placeholder="请填写">
                <!-- <el-input v-model="input" placeholder="请填写" /> -->
            </div>
        </div>
        <div class="input-box">
            <div class="input-label">备注</div>
            <div class="input-fill">
                <input type="text" placeholder="请填写">
                <!-- <el-input v-model="input" placeholder="请填写" /> -->
            </div>
        </div>
        <div class="btn-list">
            <div class="cancel btn btnPointer">取消</div>
            <div class="confirm btn btnPointer">提交</div>
        </div>
    </div>
</template>

<script setup>

const form = reactive({
    year: ""
})


const yearColumns = ref([])
function createYearColumn() {
    const currentYear = new Date().getFullYear(); // 获取当前年份
    for (let i = -2; i <= 0; i++) {
        const year = currentYear + i; // 计算当前年及之前两年
        yearColumns.value.push({ label: year.toString(), value: year.toString() });
    }
    yearColumns.value.push({ label: '技术部门23123', value: 123 })
}
function onYear(value) {
}
onMounted(() => {
    createYearColumn()
})
</script>
<style>
.el-select__suffix>.el-icon {
    font-size: 22px;
}

.el-select__wrapper.is-hovering:not(.is-focused) {
    box-shadow: none;
}
</style>
<style lang="scss" scoped>
.addOrEdit {
    color: rgba(51, 51, 51, 1);
    padding: 0 26px;
    box-sizing: border-box;
    overflow-y: scroll;
    height: calc(100vh - 92px - 10px);
    margin-top: 10px;
    border-radius: 30px 30px 0px 0px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px -8px 10px 4px rgba(218, 231, 245, 0.5);

}

.input-box {
    padding: 20px 0;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(239, 239, 239, 1);

    .input-label {
        font-size: 26px;
        margin: 5px 0;
        color: rgba(51, 51, 51, 1);
    }

    .input-fill {
        input {
            width: 100%;
            font-size: 28px;
            padding: 0;
            border: none;
        }

        input::placeholder {
            color: #a8abb2;
        }

    }
}

// :v-deep(.el-input) {
//     font-size: 28px;
//     border-radius: 20px;
//     border: none;
//     box-shadow: none;
// }

.select-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(239, 239, 239, 1);

    .select-label {
        font-size: 26px;
        margin-top: 5px;
        color: rgba(51, 51, 51, 1);
    }

    .select-value {
        margin-right: 10px;
        font-size: 26px;
        color: rgba(193, 193, 193, 1);

        img {
            width: 12px;
            height: 20px;
        }
    }
}

::v-deep(.el-select__wrapper) {
    font-size: 28px;
    min-width: 300px;
    border-radius: 20px;
    border: none;
    box-shadow: none;
}

::v-depp(.el-select__suffix > .el-icon) {
    font-size: 20px;
}

::v-deep(.el-select__selected-item) {
    top: 0;
    line-height: 30px;
    text-align: right;
}

.customClass1 {
    .el-select-dropdown__item {
        min-width: 100px;
        font-size: 28px;
        height: 56px;
        line-height: 56px;
    }
}

::v-deep(.el-select__placeholder.is-transparent) {
    text-align: right;
}

.base-select {
    width: auto;
    margin-top: 10px;
}


.btn-list {
    display: flex;
    justify-content: flex-end;
    margin: 20px 0 40px 0;

    .cancel {
        width: 144px;
        height: 76px;
        opacity: 1;
        border-radius: 50px;
        background: rgba(255, 255, 255, 1);
        border: 2px solid rgba(221, 221, 221, 1);
        font-size: 28px;
        color: rgba(166, 166, 166, 1);
    }

    .confirm {
        margin-left: 24px;
        width: 200px;
        height: 76px;
        border-radius: 50px;
        background: linear-gradient(160.78deg, rgba(0, 160, 252, 1) 0%, rgba(8, 173, 255, 1) 100%), linear-gradient(90deg, rgba(47, 135, 229, 1) 0%, rgba(97, 184, 246, 1) 100%);
        font-size: 28px;
        color: rgba(255, 255, 255, 1);
    }

    .btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
</style>